use rustc_serialize::base64::{self, ToBase64};
use sha1::Digest;

pub fn gen_key(key: &String) -> String {
    let mut hasher = sha1::Sha1::new();
    hasher.update(key.as_bytes());
    hasher.update(b"258EAFA5-E914-47DA-95CA-C5AB0DC85B11");

    let result = hasher.finalize();

    return result.as_slice().to_base64(base64::STANDARD);
}
